<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
   
   	<f:metadata>
	   	<f:viewParam name="tradeRatingId" value="#{tradeRatingHome.id}" required="true"></f:viewParam>
	   	<f:event listener="#{tradeRatingHome.initConversation()}" type="preRenderView"></f:event>
	   	<f:viewParam name="moduleName" value="评价管理"></f:viewParam>
	   
   	</f:metadata>
   	<ui:define name="head">
   		<style type="text/css">
   			.column1{width:20%}
   			.column2{width:80%}
   		</style>
   	
   	</ui:define>
   	<ui:define name="content">
   
		<h:form id="editForm">
			<p:panel id="panel" header="修正评价" style="margin-bottom:10px;">
		        <p:messages id="messages" closable="true">
		       		<p:autoUpdate />
		       	</p:messages>
		        
		        <h:panelGrid columns="2" cellpadding="5" columnClasses="column1,column2">
					<p:outputLabel value="公告标题" />
					<h:outputText id="bulletinTitle" value="#{tradeRatingHome.instance.trade.bulletin.title}" />
					
					<p:outputLabel value="中选中介机构"/>
					<h:outputText id="supplierName" value="#{tradeRatingHome.instance.trade.supplier.cnname}" />

					<p:outputLabel value="评分" for="score" style="padding-bottom: 5px;"/>
					<p:outputLabel >
						<h:outputText id="output" value="当前评分为：#{tradeRatingHome.instance.score}分" />
						<h:inputHidden  id="score" required="true" value="#{tradeRatingHome.instance.score}" />
						<p:slider for="score"
								  display="output"
								  displayTemplate="当前评分为： {value}分"
								  minValue="#{tradeRatingHome.minScore}"
								  maxValue="#{tradeRatingHome.maxScore}"
								  step="1" style="width: 400px;margin-top:10px;color: red"
						/>
					</p:outputLabel>
					<p:outputLabel for="quality" value="服务质量评价"/>
					<p:inputTextarea id="quality"
						value="#{tradeRatingHome.instance.quality}"
						required="true"
						cols="50"
						rows="3"
					></p:inputTextarea>
					
					<p:outputLabel for="effectiveness" value="服务时效评价"/>
					<p:inputTextarea id="effectiveness"
						value="#{tradeRatingHome.instance.effectiveness}"
						required="true"
						cols="50"
						rows="3"
					></p:inputTextarea>
					
					<p:outputLabel for="attitude" value="服务态度评价"/>
					<p:inputTextarea id="attitude"
						value="#{tradeRatingHome.instance.attitude}"
						required="true"
						cols="50"
						rows="3"
					></p:inputTextarea>
					
					<p:outputLabel for="charge" value="服务收费评价"/>
					<p:inputTextarea id="charge"
						value="#{tradeRatingHome.instance.charge}"
						required="true"
						cols="50"
						rows="3"
					></p:inputTextarea>
					
					<p:outputLabel for="standard" value="服务规范评价"/>
					<p:inputTextarea id="standard"
						value="#{tradeRatingHome.instance.standard}"
						required="true"
						cols="50"
						rows="3"
					></p:inputTextarea>
				</h:panelGrid>
				
			</p:panel>
			
			<p:commandButton value="发布评价"  action="#{tradeRatingHome.updateGrade()}"  />
			<p:commandButton action="#{tradeRatingHome.cancel()}" value="取消" immediate="true"></p:commandButton>
		</h:form>
      
   	</ui:define>
</ui:composition>
